package com.yxuan.springboot.service.impl;

import com.yxuan.springboot.mapper.EnrollmentPlanMapper;
import com.yxuan.springboot.model.EnrollmentPlan;
import com.yxuan.springboot.service.EnrollmentPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;


/**
 * 
 * @author zchao
 *    EnrollmentPlan业务层实现类
 * @date 2023-06-06 13:29:25
 */
@Service
@Transactional
public class EnrollmentPlanServiceImpl extends BaseServiceImpl<EnrollmentPlan> implements EnrollmentPlanService {



    @Autowired
    private EnrollmentPlanMapper enrollmentPlanMapper;

    @Override
    public List<EnrollmentPlan> findYearByGroup(String schoolId, String provinceName) {
        List<EnrollmentPlan> enrollmentPlanList = enrollmentPlanMapper.getYearByGroup(schoolId,provinceName);
        ArrayList arrayList = new ArrayList();
        for (EnrollmentPlan enrollmentPlan : enrollmentPlanList){
            arrayList.add(enrollmentPlan.getStudentYear());
        }
        return arrayList;
    }
}
